package main

import "fmt"

type Object struct {
	num1 int
	num2 int
}
type Add struct {
	Object
}

func (p *Add) getResult(a int, b int) int {
	p.num1 = a
	p.num2 = b
	return p.num1 + p.num2
}

type Sub struct {
	Object
}

func (p *Sub) getResult(a int, b int) int {
	p.num1 = a
	p.num2 = b
	return p.num1 - p.num2
}
func main() {
	var add Add
	n := add.getResult(1, 3)
	fmt.Println(n)
	var sub Sub
	m := sub.getResult(3, 1)
	fmt.Println(m)
}
